package com.craney.aboutDrawing
{
	import flash.display.Shape;
	import flash.display.Sprite;
	
	public class TestBeginDrawing
	{
		public function TestBeginDrawing(ps:Sprite)
		{
			var shp:Shape = new Shape();
			
			shp.x = 80;
			shp.y = 80;
			
			try
			{
				shp.graphics.lineStyle(2, 0xffcc00, 1);
//				shp.graphics.drawRect(0, 0, 100, 100);
				shp.graphics.beginFill(0xccff00);
//				shp.graphics.drawCircle(0, 0, 80);
//				shp.graphics.beginFill(0x00ffcc);
//				shp.graphics.drawCircle(40, 40, 30);
	
				shp.graphics.moveTo(200, 200);
				shp.graphics.lineTo(220, 220);
				
				shp.graphics.moveTo(400, 400);
				shp.graphics.lineTo(450, 400);
				shp.graphics.lineTo(500, 200);
				shp.graphics.lineTo(43, 555);				
				
//				shp.graphics.endFill();
				
//				shp.graphics.lineTo(0, 80);
				
	
				ps.addChild(shp);
				
			}
			catch(e:Error)
			{
				trace(e.message);
			}
			finally
			{
				trace("finally!");
			}
			
			
		}

	}
}